package com.infinit.selfhelp.common.loading

import android.content.Context
import android.content.DialogInterface

interface LoadingDialogManager {

    val loadingDelegate: ILoadingDelegate

    fun showLoadingDialog(context: Context, cancelListener: DialogInterface.OnCancelListener?) {
        loadingDelegate.showDialog(context, "loading", false, cancelListener)
    }

    fun showLoadingDialog(context: Context, cancelAble: Boolean, cancelListener: DialogInterface.OnCancelListener?) {
        loadingDelegate.showDialog(context, "loading", cancelAble, cancelListener)
    }

    fun showLoadingDialog(context: Context) {
        loadingDelegate.showDialog(context, "loading", false, null)
    }

    fun hideLoadingDialog() {
        loadingDelegate.dismissDialog()
    }
}
